<?php
/**
 * Application authorization handler class.
 * @author Juhani Ruohotie
 */
abstract class Core_Auth implements Core_Defines
{

    public static function authenticate()
    {
        return true;

    }

    /*
     * Workaround private method for parsing the base URL. The framework doesn't give the full path.
     */
    private function baseURL()
    {
        $pageURL = 'http';
        if (isset($_SERVER["HTTPS"])&&$_SERVER["HTTPS"] == "on")
        {
            $pageURL .= "s";
        }
        $pageURL .= "://";
        if ($_SERVER["SERVER_PORT"] != "80" &&$_SERVER["SERVER_PORT"] != "443")
        {
            $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"];
        } else
        {
            $pageURL .= $_SERVER["SERVER_NAME"];
        }
        return $pageURL.'/';
    }
}
